<template>
	<div>
		<div>
			人证比对：
			<el-radio-group v-model="radio">
			<el-radio  label="1">全部</el-radio>
			<el-radio  label="2">正常</el-radio>
			<el-radio  label="3">异常</el-radio>
			</el-radio-group>
		</div>
		<div v-if="radio==1">
			<div v-for="Item in ResultList" :key="Item.faceCardId">
				<el-descriptions style="margin-top: 2.25rem;">
					<el-descriptions-item label="姓名">{{Item.userId}}</el-descriptions-item>
					<el-descriptions-item label="身份证">{{Item.userCard}}</el-descriptions-item>
					<el-descriptions-item label="人证比对">
						<el-tag type="success" v-show="Item.result==1">正常</el-tag>
						<el-tag type="danger" v-show="Item.result==0">异常</el-tag>
					</el-descriptions-item>
					<el-descriptions-item label="人脸">
						<el-image style="width: 200px; height: 150px" :src="Item.facePath">
						</el-image>
					</el-descriptions-item>
					<el-descriptions-item label="身份证">
						<el-image style="width: 200px; height: 150px" :src="Item.cardPath">
						</el-image>
					</el-descriptions-item>

				</el-descriptions>
				<el-divider></el-divider>
			</div>
		</div>
		<div v-if="radio==3">
			<div v-for="Item in ResultList" :key="Item.faceCardId" v-show="Item.result==0">
				<el-descriptions style="margin-top: 2.25rem;">
					<el-descriptions-item label="姓名">{{Item.userId}}</el-descriptions-item>
					<el-descriptions-item label="身份证">{{Item.userCard}}</el-descriptions-item>
					<el-descriptions-item label="人证比对">
						<el-tag type="success" v-show="Item.result==1">正常</el-tag>
						<el-tag type="danger" v-show="Item.result==0">异常</el-tag>
					</el-descriptions-item>
					<el-descriptions-item label="人脸">
						<el-image style="width: 200px; height: 150px" :src="Item.facePath">
						</el-image>
					</el-descriptions-item>
					<el-descriptions-item label="身份证">
						<el-image style="width: 200px; height: 150px" :src="Item.cardPath">
						</el-image>
					</el-descriptions-item>

				</el-descriptions>
				<el-divider></el-divider>
			</div>

		</div>
		<div v-if="radio==2">
			<div v-for="Item in ResultList" :key="Item.faceCardId" v-show="Item.result==1">
				<el-descriptions style="margin-top: 2.25rem;">
					<el-descriptions-item label="姓名">{{Item.userId}}</el-descriptions-item>
					<el-descriptions-item label="身份证">{{Item.userCard}}</el-descriptions-item>
					<el-descriptions-item label="人证比对">
						<el-tag type="success" v-show="Item.result==1">正常</el-tag>
						<el-tag type="danger" v-show="Item.result==0">异常</el-tag>
					</el-descriptions-item>
					<el-descriptions-item label="人脸">
						<el-image style="width: 200px; height: 150px" :src="Item.facePath">
						</el-image>
						
					</el-descriptions-item>
					<el-descriptions-item label="身份证">
						<el-image style="width: 200px; height: 150px" :src="Item.cardPath">
						</el-image>
					</el-descriptions-item>

				</el-descriptions>
				<el-divider></el-divider>
			</div>

		</div>

	</div>
</template>

<script>
	import {
		HttpManager
	} from "../../../../../request/Teacher.js"
	export default {
		data() {
			return {
				// src: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg',
				radio: "1",
				examId: 1,
				ResultList: []
			}
		},
		props: {
			examName:{
				type: String
			}
		},
		created() {
			// alert(this.value);
			this.faceCardResultList();
		},
		watch:{
			examName(newvel){
				console.log(newvel);
				this.faceCardResultList();
			}
		},
		methods: {
			srcList() {

			},
			//获取考前认证对比结果列表
			faceCardResultList() {
				var parmas = {
					examId:this.examName
				}
				HttpManager.faceCardResultList(parmas).then(e => {
					console.log(e);
					this.ResultList = e.data.data;
				})
			}
		}
	}
</script>

<style>
</style>
